#pragma once
#include "types.h"
#include "addition.h"
#include "correctAdd.h"

bool test (Addition add)
{
	bool res = true;

	double* a = new double[NUM];
	double* b = new double[NUM];
	double* c = new double[NUM];
	double* p = new double[NUM];

	for (int i = 0; i < NUM; i++)
	{
		a[i] = i * 1.0;
		b[i] = i * 2.0;
	}
	
	add(a,b,p);
	
	correctAdd(a,b,c);

	for (int i=0; i<NUM; i++)
	{
		if (c[i]!=p[i])
		{
			res = false;
			break;
		}
	}

	delete []c;
	delete []a;
	delete []b;
	delete []p;

	return res;
}